import React from 'react'
import { createBrowserRouter } from 'react-router-dom'


//董起嘉的组件
let Home = React.lazy(() => import('../component/Home/Home')) //框架主页面  一级路由


let Monitoring_analytics = React.lazy(() => import('../component/Monitoring_analytics/Monitoring_analytics')) //监控分析 二级路由
let Operate_monitor = React.lazy(() => import('../component/Monitoring_analytics/Operate_monitor/Operate_monitor')) //运营监控 三级路由
let User_analytics = React.lazy(() => import('../component/Monitoring_analytics/User_analytics/User_analytics')) //用户监控 三级路由
let Colonel_analytics = React.lazy(() => import('../component/Monitoring_analytics/Colonel_analytics/Colonel_analytics')) //团长分析 三级路由
let Trade_analytics = React.lazy(() => import('../component/Monitoring_analytics/Trade_analytics')) //交易分析 三级路由
let Commodity_analytics = React.lazy(() => import('../component/Monitoring_analytics/Commodity_analytics')) //商品分析 三级路由


let Order = React.lazy(() => import('../component/Orders/orders')) //订单 二级路由
let Order_management = React.lazy(() => import('../component/Orders/Order_management/Order_management')) //订单管理 三级路由
let Details = React.lazy(() => import('../component/Orders/Details')) //数据详情 三级路由
let After_sales_management = React.lazy(() => import('../component/Orders/After_sales_management/After_sales_management')) //售后管理 三级路由
let Shipments_manage = React.lazy(() => import('../component/Orders/Shipments_manage/Shipments_manage')) //发货管理 三级路由





let User = React.lazy(() => import('../component/User/User')) //用户 二级路由
let User_management = React.lazy(() => import('../component/User/User_manage/User_manage')) //用户管理 三级路由
let User_tags = React.lazy(() => import('../component/User/User_tags/User_tags')) //用户标签 三级路由


let System = React.lazy(() => import('../component/System/System')) //系统管理  二级路由
let Account_management = React.lazy(() => import('../component/System/Account_management/Account_management'))//账户管理 三级路由
let Cos_management = React.lazy(() => import('../component/System/Cos_management/Cos_management')) //角色管理 三级路由
let Operation_logs = React.lazy(() => import('../component/System/Operation_logs')) //操作日志 三级路由
let Addcos = React.lazy(() => import('../component/System/Cos_management/Addcos')) //添加角色 三级路由
let Updatacos = React.lazy(() => import('../component/System/Cos_management/Updatacos')) //修改角色 三级路由


let Content = React.lazy(() => import('../component/Content/Content')) //内容管理 二级路由
let Words = React.lazy(() => import('../component/Content/words/words')) //搜索热词 三级路由
let Ads = React.lazy(() => import('../component/Content/ads/Ads')) //广告管理 三级路由
let Special = React.lazy(() => import('../component/Content/Special/special')) //专题管理 三级路由






//徐晓坤的组件
let Login = React.lazy(() => import('../component/Login/Login'))//登录页面
let Groupjs = React.lazy(() => import('../component/Groupjs/Groupjs'))  //团长 二级路由
let Nucleus = React.lazy(() => import('../component/Groupjs/nucleus/nucleus'))  //
let Administration = React.lazy(() => import('../component/Groupjs/Administration/Administration'))
let Label = React.lazy(() => import('../component/Groupjs/label/label'))
let Commodity = React.lazy(() => import('../component/Commodity/Commodity')) //商品管理 二级路由
let CommodityAdministration = React.lazy(() => import('../component/Commodity/Administration/Administration'))
let Add_goods = React.lazy(() => import('../component/Commodity/Administration/Add_goods')) //添加商品
let Brand = React.lazy(() => import('../component/Commodity/brand/brand'))
let Classification = React.lazy(() => import('../component/Commodity/classification/classification'))
let CommodityLabel = React.lazy(() => import('../component/Commodity/label/label'))
let Stock = React.lazy(() => import('../component/Commodity/stock/stock'))
let Finances = React.lazy(() => import('../component/Finances/Finances')) //财务管理 二级路由
let Reconciliation = React.lazy(() => import('../component/Finances/Reconciliation/Reconciliation'))
let Commission = React.lazy(() => import('../component/Finances/Commission/Commission'))
let Withdrawal = React.lazy(() => import('../component/Finances/Withdrawal/Withdrawal'))
// let Operate = React.lazy(() => import('../component/operate/operate')) //运营管理 二级路由
// let Coupon = React.lazy(() => import('../component/operate/coupon/coupon'))
// let Discount = React.lazy(() => import('../component/operate/discount/discount'))
// let Pinduoduo = React.lazy(() => import('../component/operate/Pinduoduo/Pinduoduo'))
// let Seckill = React.lazy(() => import('../component/operate/seckill/seckill'))

const router = createBrowserRouter([
    { path: "/Login", element: <Login></Login> },
    { path: '*', element: <Login></Login> },
    {
        path: "/Home", element: <Home></Home>, children: [
            // 监控分析
            {
                path: 'Monitoring_analytics', element: <Monitoring_analytics></Monitoring_analytics>, children: [
                    { path: 'Operate_monitor', element: <Operate_monitor></Operate_monitor> },
                    { path: 'User_analytics', element: <User_analytics></User_analytics> },
                    { path: 'Trade_analytics', element: <Trade_analytics></Trade_analytics> },
                    { path: 'Colonel_analytics', element: <Colonel_analytics></Colonel_analytics> },
                    { path: 'Commodity_analytics', element: <Commodity_analytics></Commodity_analytics> },
                ]
            },

            // 订单
            {
                path: 'Order', element: <Order></Order>, children: [
                    { path: 'Order_management', element: <Order_management></Order_management> },
                    { path: 'Details', element: <Details></Details> },
                    { path: 'After_sales_management', element: <After_sales_management></After_sales_management> },
                    { path: 'Shipments_manage', element: <Shipments_manage></Shipments_manage> }
                ]
            },
            // 内容
            {
                path: 'Content', element: <Content></Content>, children: [
                    { path: 'words', element: <Words></Words> },
                    { path: 'ads', element: <Ads></Ads> },
                    { path: 'special', element: <Special></Special> },
                ]
            },
            // 系统管理
            {
                path: 'System', element: <System></System>, children: [
                    { path: 'Account_management', element: <Account_management></Account_management> },
                    { path: 'Cos_management', element: <Cos_management></Cos_management> },
                    { path: 'Operation_logs', element: <Operation_logs></Operation_logs> },
                    { path: 'Addcos', element: <Addcos></Addcos> },
                    { path: 'Updatacos', element: <Updatacos></Updatacos> }
                ]
            },
            // 用户管理
            {
                path: 'User', element: <User></User>, children: [
                    { path: 'User_management', element: <User_management></User_management> },
                    { path: 'User_tags', element: <User_tags></User_tags> },
                ]
            },

            //团长
            {
                path: 'Groupjs', element: <Groupjs></Groupjs>, children: [
                    { path: 'Administration', element: <Administration></Administration> },
                    { path: 'label', element: <Label></Label> },
                    { path: 'nucleus', element: <Nucleus></Nucleus> },
                ]
            },

            //商品
            {
                path: 'Commodity', element: <Commodity></Commodity>, children: [
                    { path: 'CommodityAdministration', element: <CommodityAdministration></CommodityAdministration> },
                    { path: 'Add_goods', element: <Add_goods></Add_goods> },
                    { path: 'Brand', element: <Brand></Brand> },
                    { path: 'Classification', element: <Classification></Classification> },
                    { path: 'CommodityLabel', element: <CommodityLabel></CommodityLabel> },
                    { path: 'Stock', element: <Stock></Stock> },
                ]
            },

            // //财务
            {
                path: 'Finances', element: <Finances></Finances>, children: [
                    { path: 'Reconciliation', element: <Reconciliation></Reconciliation> },
                    { path: 'commission', element: <Commission></Commission> },
                    { path: 'Withdrawal', element: <Withdrawal></Withdrawal> },
                ]
            },

        ]
    }
])


export default router